using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
	[Table("HrmMpFieldPosition")]
    public class MpFieldPosition
    {
        public MpFieldPosition()
        {

        }

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "FieldPosId", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public int FieldPosId { get; set; }

		[DataMember, Display(Name = "FieldPosCode", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public string FieldPosCode { get; set; }

		[DataMember, Display(Name = "FieldPosName", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public string FieldPosName { get; set; }

		[DataMember, Display(Name = "FieldPosNameEng", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public string FieldPosNameEng { get; set; }

		[DataMember, Display(Name = "FieldPosLine", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public string FieldPosLine { get; set; }

		[DataMember, Display(Name = "FieldPosLineShort", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public string FieldPosLineShort { get; set; }

		[DataMember, Display(Name = "FieldPosLineEng", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public string FieldPosLineEng { get; set; }
        
		[ForeignKey("EmpType")]
		[DataMember, Display(Name = "EmpTypeId", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<int> EmpTypeId { get; set; }

		[ForeignKey("PosType")]
		[DataMember, Display(Name = "PosTypeId", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<int> PosTypeId { get; set; }

		[ForeignKey("FieldGroup")]
		[DataMember, Display(Name = "FieldGroupId", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<int> FieldGroupId { get; set; }
        //[ForeignKey("ClassSpecification")]

		[ForeignKey("ClassSpec")]
		[DataMember, Display(Name = "ClassSpecId", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<int> ClassSpecId { get; set; }

		[DataMember, Display(Name = "FieldPosSeqNew", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<int> FieldPosSeqNew { get; set; }

		[DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public string Remarks { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }


        //[DataMember, Display(Name = "HrmPsEmployeeTypes", ResourceType = typeof (Resources.MpFieldPositionsResource))]
        //public MasEmployeeType HrmPsEmployeeTypes { get; set; }

        //[DataMember, Display(Name = "HrmMpPositionTypes", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        //public HRM.MasPositionType HrmMpPositionTypes { get; set; }

        //[DataMember, Display(Name = "HrmMpFieldGroups", ResourceType = typeof(Resources.MpFieldPositionsResource))]
        //public HRM.MpFieldGroup HrmMpFieldGroups { get; set; }
        //public masClassSpecification ClassSpecification { get; set; }

        //protected override void OnModelCreating(DbModelBuilder modelBuilder)
        //{
        //    modelBuilder.Entity<hrm_mp_field_positions>()
        //        .HasRequired(p => p.hrm_mp_class_specifications)
        //        .WithMany()
        //        .Map(p => p.MapKey("FkFieldClassSpecClassSpecSeq"))
        //        ;
        //}

		public virtual HRM.MasEmployeeType EmpType { get; set; }

		public virtual HRM.MasPositionType PosType { get; set; }

		public virtual HRM.MpFieldGroup FieldGroup { get; set; }

		public virtual HRM.MasClassSpecification ClassSpec { get; set; }

    }
}